package com.zretc.question.dao;

import com.zretc.api.pojo.Question;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;

public interface QuestionMapper {
    Integer addSingleRecord(Question question);
    Integer deleteSingleRecord(Integer id);
    Integer deleteRecordsByIRId(Integer iRId);
    ArrayList<Question> getQuestionsByAmountByIRId(@Param("index") Integer index,
                                                   @Param("pageNum") Integer pageNum,
                                                   @Param("iRId") Integer iRId);

    Integer getCreatedByOfQuestionById(Integer id);

    Integer getIRPublisherIdOfQuestionById(Integer id);
    Integer getAnswerCountsOfQuestion(Integer questionId);
}
